package com.struts.action;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionContext;
import com.struts.pojo.Person;

public class UIAction {
	
	public String testUI() {
		List<Person> list = new ArrayList<Person>() ;
		list.add(new Person(1, "张三01")) ;
		list.add(new Person(2, "张三02")) ;
		list.add(new Person(3, "张三03")) ;
		ActionContext.getContext().put("personList", list);
		return "ui" ;
	}
	
	/**
	 * 测试数据回西显
	 * @return
	 */
	public String showBackData() {
		Person person = new Person(1, "张三") ;
//		ActionContext.getContext().getValueStack().push(person) ;
		ActionContext.getContext().getValueStack().set("person", person) ;
		return "ui" ;
	}

}
